package com.gagakuai.bpm.demo.messageEvent.business;

import lombok.extern.slf4j.Slf4j;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.springframework.stereotype.Component;

/*
 * @program: bpm_server
 * @description: 业务定单完成
 * @author: houhong
 * @create: 2022-07-21 22:26
 */
@Slf4j
@Component(value = "businessOrderComplete")
public class BusinessOrderComplete implements JavaDelegate {

    @Override
    public void execute(DelegateExecution delegateExecution) throws Exception {

        delegateExecution.getProcessEngineServices()
                .getRuntimeService()
                .createMessageCorrelation("businessOrderComplete")
                .processInstanceBusinessKey("messageBusinessKey")
                .correlate();

    }
}